﻿<?xml version="1.0" encoding="utf-8"?>

<!--
  business ids mapping
-->

<Mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  
  <Entity type="NUnit:Sync:Person" table="Person">
    <Id field="PersonId">
      <Generator name="assigned">
        <Property name="dbType">String</Property>
        <Property name="size">255</Property>
      </Generator>
    </Id>

    <Attribute name="Firstname" field="Firstname" db-type="String" size="50" not-null="false" />
    <Attribute name="Lastname" field="Lastname" db-type="String" size="50" not-null="false" />

    <Reference name="Adresses" entityChild="NUnit:Sync:Adress">
      <Rule parentField="PersonId" childTable="Adress" childField="FK_PersonId" />
    </Reference>

  </Entity>

  <Entity type="NUnit:Sync:Adress" table="Adress">
    <Id field="AdressId">
      <Generator name="guid"/>
    </Id>

    <Attribute name="City" field="City" db-type="String" size="50" not-null="false" />
    <Attribute name="Street" field="Street" db-type="String" size="50" not-null="false" />
    <Attribute name="Phone" field="Phone" db-type="String" size="50" not-null="false" />
    <Attribute name="PostCode" field="PostCode" db-type="String" size="50" not-null="false" />
    <Attribute name="Country" field="Country" db-type="String" size="50" not-null="false" />



  </Entity>

</Mapping>